# -*- coding: UTF-8 -*-
from multiprocessing import Queue

class Pipe:
    def __init__(self, x_coordinate, y_coordinate, z_coordinate, start_node, end_node, pipe_length, pipe_diameter,
                 pipe_roughness,total_flow):
        self.x_coordinate = x_coordinate
        self.y_coordinate = y_coordinate
        self.z_coordinate = z_coordinate
        self.start_node = start_node
        self.end_node = end_node
        self.pipe_length = pipe_length
        self.pipe_diameter = pipe_diameter
        self.pipe_roughness = pipe_roughness
        self.total_flow = total_flow

    def flow(self,flow_in:Queue,flow_out:Queue):
        while True:
            self.start_node = flow_in.get(True)
            self.end_node = self.start_node
            flow_out.put(self.end_node)
            self.total_flow += self.end_node
